<link href="__PUBLIC__/Admin/css/same.css"  type="text/css" rel="stylesheet"/>
<link href="__PUBLIC__/css/bootstrap.css"  type="text/css" rel="stylesheet"/>
<script src="__PUBLIC__/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/bootstrap.js" type="text/javascript"></script>
<script src="__PUBLIC__/Admin/js/ReadManage.js" type="text/javascript"></script>
<div class="a-main-left-content">
    <div class="a_con_title">
        <h4>读者类型管理</h4>
    </div>
    <div class="a_title_tip">
        <img class="a_record_icon" src="/Public/img/record_01.jpg"/>
        <span class="a_record_news">请认真修改读者类型，便于进行用户分类管理。</span>
    </div>

    <div class="read_type_box">
        <div class="read_type_sousuo">
            <form action="{:U('Admin/ReadManage/readTypeSerach')}" method="post">
                <span>录入者名称：</span>
                <input type="text" name="u_type_name">
                <span>用户类型状态：</span>
                <select name="u_type_status">
                    <option value="">&nbsp;&nbsp;请选择</option>
                    <option value="1">&nbsp;&nbsp;使用中</option>
                    <option value="2">&nbsp;&nbsp;未使用</option>
                </select>
                    <div class="read_submit">
                        <img src="__PUBLIC__/Admin/img/record_02.jpg" alt="搜索">
                        <input type="submit" value="查询" >
                        <button type="button" data-toggle="modal" data-target="#myModal">
                             添加
                        </button>
                    </div>
            </form>
                <!---->
                <!-- Modal -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="myModalLabel">读者类型添加</h4>
                            </div>
                            <div class="modal-body">
                                <div class="top_form_read">
                                    <span>读者类型名称：</span>
                                    <input type="text" name="u_type_name" placeholder="&nbsp;&nbsp;读者类型名称" id="u_type_name">
                                </div>
                                <div class="top_form_read">
                                    <span> 读者可借数量：</span>
                                    <input type="text" name="u_book_borrow" placeholder="&nbsp;&nbsp;读者可借数量" id="u_book_borrow" onkeyup="value=this.value.replace(/\D+/g,'')">
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button type="button" class="btn btn-primary add" >添加</button>
                            </div>
                            <input type="hidden" value="{:U('Admin/ReadManage/readTypeAdd')}" id="add-url">
                        </div>
                    </div>
                </div>
                <!----->
        </div>
        <div class="read_type_table">
            <div class="table_span">
                <span>读者类型信息</span>
            </div>
            <div class="height_con">
                <table class="table_read">
                    <tr >
                        <th>读者类型名称</th>
                        <th>可借数量</th>
                        <th>录入者名称</th>
                        <th>录入时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    <volist name="_getReadTypeInfo" id="vo">
                        <if condition="$vo['u_type_status'] eq 1">
                            <tr>
                                <td>{$vo['u_type_name']}</td>
                                <td>{$vo['u_book_borrow']}</td>
                                <td>{$vo['a_name']}</td>
                                <td>{$vo['u_type_intime']|date="Y-m-d H:i:s",###}</td>
                                <td class="status1">{$vo['u_type_status']}</td>
                                <td>
                                    <button class="dis wyz_dd" data-id-dis="{$vo['u_type_id']}">禁用</button>
                                    <button class="del wyz_dd1" data-id-del="{$vo['u_type_id']}">删除</button>
                                </td>
                            </tr>
                            <else/>
                            <tr>
                                <td>{$vo['u_type_name']}</td>
                                <td>{$vo['u_book_borrow']}</td>
                                <td>{$vo['a_name']}</td>
                                <td>{$vo['u_type_intime']|date="Y-m-d H:i:s",###}</td>
                                <td class="status2">{$vo['u_type_status']}</td>
                                <td>
                                    <button class="rec wyz_bb" data-id-rec="{$vo['u_type_id']}">恢复</button>
                                    <button class="del wyz_dd1" data-id-del="{$vo['u_type_id']}">删除</button>
                                </td>
                            </tr>
                        </if>
                    </volist>
                </table>
            </div>
            <input type="hidden" value="{:U('Admin/ReadManage/readTypeDis')}" id="dis-url">
            <input type="hidden" value="{:U('Admin/ReadManage/readTypeRec')}" id="rec-url">
            <input type="hidden" value="{:U('Admin/ReadManage/readTypeDel')}" id="del-url">
        </div>
    </div>
</div>
<script>
    $(".status1").html("使用中");
    $(".status2").html("未使用");
</script>